#ifndef CRC_H
#define CRC_H

#include "main.h"
#include <stdlib.h>
#define CRSF_CONNETED   1
#define CRSF_DISCONNECT 0

void crc8_init(void);
uint8_t calculate_crc8_from_table(const uint8_t *data, size_t len);
int16_t limit(int16_t min_val, int16_t val, int16_t max_val) ;
#endif
